# 调试
# print()

# assert  断言
import logging
logging.basicConfig(level=logging.INFO)   # 日志输出级别


def foo(s):
    n = int(s)
    assert n != 0, 'n is zero'
    return 10 / n

def main():
    foo(2)

print(main())


# logging  把print()替换为logging是第3种方式，和assert比，logging不会抛出错误，而且可以输出到文件

s = '0'
n = int(s)
logging.info('n=%d' % n)
print(10 / n)


# pdb



